package com.example.world.dao;

import java.sql.SQLException;
import java.util.List;

import org.junit.jupiter.api.Test;

import com.example.world.domain.Country;

import junit.framework.TestCase;

public class TestCountryDAO {

	@Test
	public void test1() throws SQLException
	{
		
		CountryDAO dao = new CountryDAO();
		
		Country c = dao.findByCode("AFG");
		System.out.println(c);
		
		TestCase.assertNotNull(c);
	}
	
	@Test
	public void test2() throws SQLException
	{
		
		CountryDAO dao = new CountryDAO();
		
		List<Country> list = dao.findAll();
		for(Country c:list)
		{
			System.out.println(c);
		}
		
		TestCase.assertNotNull(list);
	}
}
